<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="se" uri="http://www.springframework.org/security/tags" %>
<script>
	function formChk() {
		var j_username = $("#j_username").val();
		var j_password = $("#j_password").val();
		//alert(recruit_nm);
		if (j_username == null || j_username == "" || j_username == " ") {
			alert("아이디를 입력해주세요");
			document.loginForm.j_username.focus();
		} else {
			
			if(j_password == null || j_password == "" || j_password == " ") {
				alert("비밀번호를 올바르게 입력해주세요");
				document.loginForm.j_password.focus();
			}else{
				document.loginForm.submit();
				return true;
			}
		}
	}
</script>
<div id="content_work">
    <!-- 컨텐츠 -->
    <div class="work_contents3">
        <h1><img src="images/recruit/admin/title_adminlogin.gif" alt="관리자 로그인"></h1>
        <div class="bg">
            <div><img src="images/recruit/bg_top.gif"></div>

            <c:if test="${param.error != null}">
                <div>로그인실패<br>
                        <c:if test="${SPRING_SECURITY_LAST_EXCEPTION != null}">
                            이유 : <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}" />
                        </c:if>
                </div>
            </c:if>
            
            <c:url value="/j_spring_security_check" var="loginURL"></c:url>
               
            <form action="${loginURL}" method="post" onSubmit="formChk();return false" name="loginForm">
                <table id="loginpage" width="690" border="0" cellspacing="0"
                    cellpadding="0" class="box">
                    <colgroup>
                        <col width="142px">
                        <col width="300px">
                    </colgroup>
                    <tbody>
                        <tr>
                            <th class="al_l newcomer_notic_lh2"></th>
                            <td colspan="3"></td>
                        </tr>
                        <tr class="newcomer_notic_lh3">
                            <th class="al_l">
                                <img src="images/newcomer/info_icon.gif" class="ic_6"> 관리자아이디</th>
                            <td class="al_l">
                                <input name="j_username" type="text" maxlength="30" "="" class="new_txtfrom" 
                                	id="j_username" style="width: 150px;"></td>
                            </tr>
                        <tr class="newcomer_notic_lh2">
                            <th class="al_l">
                                <img src="images/newcomer/info_icon.gif"
                                class="ic_6"> 비밀번호</th>
                            <td class="al_l">
                                <input name="j_password" type="password" class="new_txtfrom va_m ma_r14" 
                                id="j_password" maxlength="15" style="width: 150px;"></td>
                        </tr>
                        <tr class="newcomer_notic_lh3">
                            <th class="al_l"></th>
                            <td  align="right" class="al_l" >
                                <input type="submit" value="Login"  style="background-color: #320c43; color: white; font-weight: bolder; 
                                		width: 77px; height: 30px;">
                                <!-- <input type="button"  value="비밀번호찾기" style="background-color: #320c43; color: white; font-weight: bolder; 
                                		width: 77px; height: 30px;" onclick="searchpwd()"> -->
                        </tr>
                    </tbody>
                </table>
            </form>
            <div class="ma_t40 pd_l245 pd_b30 al_r pd_r45"></div>
            <div>
                <img src="images/recruit/bg_f.gif">
            </div>
        </div>
    </div>
    <!-- 컨텐츠 -->
</div>
</div>
